import axios from 'axios';
const request = axios.create({
  baseURL: 'https://mall.hopernet.com:18888/api'
});

//#region 商城接口
// 查询商品一级类目
export const getParentCategory = () => {
  return request({
    url: '/mall/category/list1'
  })
};
// 查询商品二级类目
export const getChildCategory = parentId => {
  return request({
    url: '/mall/category/list2?id=' + parentId
  })
};
// 查询商品详情
export const getGoodsDetail = id => {
  return request({
    url: '/mall/tbSpu/getSpuDetail?spuId=' + id
  })
};
// 查询商品详情
export const getGoodsList = query => {
  return request({
    url: '/mall/tbSpu/getProductByCategory',
    method: 'post',
    data: query
  })
}





//#endregion
